package tv.huan.media.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tv.huan.common.core.text.Convert;
import tv.huan.media.mapper.TencentInfoMapper;
import tv.huan.media.domain.TencentInfo;
import tv.huan.media.service.ITencentInfoService;

/**
 * 配置信息Service业务层处理
 *
 * @author admin
 * @date 2019-09-03
 */
@Service
public class TencentInfoServiceImpl implements ITencentInfoService
{
    @Autowired
    private TencentInfoMapper tencentInfoMapper;

    /**
     * 查询配置信息
     *
     * @param id 配置信息ID
     * @return 配置信息
     */
    @Override
    public TencentInfo selectTencentInfoById(Integer id)
    {
        return tencentInfoMapper.selectTencentInfoById(id);
    }

    public List<TencentInfo> selectTencentInfoByUserId(String userId){
        return tencentInfoMapper.selectTencentInfoByUserId(userId);
    }

    /**
     * 查询配置信息列表
     *
     * @param tencentInfo 配置信息
     * @return 配置信息
     */
    @Override
    public List<TencentInfo> selectTencentInfoList(TencentInfo tencentInfo)
    {
        return tencentInfoMapper.selectTencentInfoList(tencentInfo);
    }

    /**
     * 修改配置信息
     *
     * @param tencentInfo 配置信息
     * @return 结果
     */
    @Override
    public int updateTencentInfo(TencentInfo tencentInfo)
    {
        return tencentInfoMapper.updateTencentInfo(tencentInfo);
    }
}